﻿using com.kmer.Attributes;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OrderAPI.Model
{
    /// <summary>
    /// 审版数据模型
    /// </summary>
    public class OrderMaster
    {
        [Description("提供登陆页使用的订货会列表")]
        public class LoginOrderMaster
        {
            [ParamDescription("MasterID")]
            public int MasterID { get; set; }

            [ParamDescription("订货会名称")]
            public string OrderName { get; set; }
        }

        [Description("系列，商品层，项目")]
        public class BaseParamData
        {
            [ParamDescription("系列")]
            public IList<string> Series { get; set; }

            [ParamDescription("商品层")]
            public IList<string> Goods { get; set; }

            [ParamDescription("项目")]
            public IList<string> Items { get; set; }
        }

        [Description("商品列表")]
        public class OrderStyleDetailData
        {
            [ParamDescription("DetailID")]
            public int DetailID { get; set; }

            [ParamDescription("MasterID")]
            public int MasterID { get; set; }

            [ParamDescription("流水号")]
            public string SerialNo { get; set; }

            [ParamDescription("设计号")]
            public string DesignNo { get; set; }

            [ParamDescription("系列")]
            public string SerialName { get; set; }

            [ParamDescription("商品层")]
            public string MaterialProperty { get; set; }

            [ParamDescription("项目")]
            public string ItemName { get; set; }

            [ParamDescription("吊牌价")]
            public Nullable<decimal> RetailPrice { get; set; }

            [ParamDescription("图片")]
            public string ImgUrl { get; set; }

            [ParamDescription("是否评分")]
            public bool IsScore { get; set; }

            [ParamDescription("是否定版 true：是 false：否")]
            public bool IsChooseFlag { get; set; }
        }

        [Description("时尚度级别保存实体")]
        public class OrderFashionLevelSaveModel
        {
            public IList<OrderFashionLevelModel> list { get; set; }
        }

        [Description("时尚度级别实体")]
        public class OrderFashionLevelModel
        {
            [ParamDescription("MasterID")]
            public int MasterID { get; set; }
            [ParamDescription("流水号")]
            public string SerialNo { get; set; }
            [ParamDescription("A时尚度级别")]
            public string AStoreLevel { get; set; }
            [ParamDescription("B时尚度级别")]
            public string BStoreLevel { get; set; }
        }

        [Description("商品列表")]
        public class OrderStyleDetailDataV2: OrderFashionLevelModel
        {
            [ParamDescription("DetailID")]
            public int DetailID { get; set; }

            [ParamDescription("设计号")]
            public string DesignNo { get; set; }

            [ParamDescription("系列")]
            public string SerialName { get; set; }

            [ParamDescription("商品层")]
            public string MaterialProperty { get; set; }

            [ParamDescription("项目")]
            public string ItemName { get; set; }

            [ParamDescription("吊牌价")]
            public decimal? RetailPrice { get; set; }

            [ParamDescription("图片")]
            public string ImgUrl { get; set; }

            [ParamDescription("应评人数")]
            public int AllPersonaCount { get; set; }

            [ParamDescription("实评人数")]
            public int GradePersonaCount { get; set; }

            [ParamDescription("A店铺评分")]
            public double AStoreRating { get; set; }

            [ParamDescription("B店铺评分")]
            public double BStoreRating { get; set; }

            [ParamDescription("款式评分")]
            public double StyleRating { get; set; }
        }
        
        [Description("定版列表(ChooseVersionHandler.GetList)")]
        public class ChooseVersionData: OrderStyleDetailData
        {
            [ParamDescription("定版(true-定版,false-取消定版)")]
            public bool ChooseFlag { get; set; }

            [ParamDescription("综合得分")]
            public decimal IntegrateScore { get; set; }

            [ParamDescription("应评人数")]
            public int AllPersonaCount { get; set; }

            [ParamDescription("实评人数")]
            public int GradePersonaCount { get; set; }
        }

        [Description("年份，季节")]
        public class YearSeasonData
        {
            [ParamDescription("年份")]
            public IList<YearSeasonName> Year { get; set; }

            [ParamDescription("季节")]
            public IList<YearSeasonName> Season { get; set; }
        }

        [Description("年份季节名称")]
        public class YearSeasonName
        {
            [ParamDescription("年份名称")]
            public string dictName { get; set; }
        }

        [Description("订货会商品详情评分数据集")]
        public class OrderStyleDetailScoreList
        {
            [ParamDescription("评分数据集")]
            public IList<OrderStyleDetailScoreData> ScoreData { get; set; }
            //[ParamDescription("评分数据项")]
            //public IList<OrderGradeDetailData> ScoreItem { get; set; }
            //[ParamDescription("评分结果数据")]
            //public IList<GetOrderGradeResultList> ScoreGrade { get; set; }

        }

        [Description("订货会商品详情评分数据实体类")]
        public class OrderStyleDetailScoreData
        {
            [ParamDescription("商品详情内码ID")]
            public int DetailID { get; set; }
            [ParamDescription("订货会内码ID")]
            public int MasterID { get; set; }
            [ParamDescription("流水号")]
            public string SerialNo { get; set; }
            [ParamDescription("设计号")]
            public string DesignNo { get; set; }
            [ParamDescription("颜色名称")]
            public string ColorName { get; set; }
            [ParamDescription("年份")]
            public int YearNo { get; set; }
            [ParamDescription("季节")]
            public string SeasonName { get; set; }
            [ParamDescription("系列")]
            public string SerialName { get; set; }
            [ParamDescription("商品层")]
            public string MaterialProperty { get; set; }
            [ParamDescription("项目")]
            public string ItemName { get; set; }
            [ParamDescription("款型")]
            public string ModelName { get; set; }
            [ParamDescription("厚薄")]
            public string ThicknessName { get; set; }
            [ParamDescription("元素")]
            public string ElementName { get; set; }
            [ParamDescription("领型")]
            public string CollarTypeName { get; set; }
            [ParamDescription("版型")]
            public string ClothesVersionName { get; set; }
            [ParamDescription("廓形")]
            public string CommodityProfileName { get; set; }
            [ParamDescription("设计师")]
            public string DesignName { get; set; }
            [ParamDescription("面料")]
            public string StuffName { get; set; }
            [ParamDescription("里料")]
            public string Lining { get; set; }
            [ParamDescription("供应商名称")]
            public string VendCustName { get; set; }
            [ParamDescription("吊牌价")]
            public Nullable<decimal> RetailPrice { get; set; }
            [ParamDescription("成本价")]
            public Nullable<decimal> CostPrice { get; set; }
            [ParamDescription("定倍率")]
            public Nullable<decimal> OrderRate { get; set; }
            [ParamDescription("图片")]
            public string ImgUrl { get; set; }

            [ParamDescription("是否评分")]
            public bool IsScore { get; set; }
            [ParamDescription("保存的常用词条")]
            public string Remark { get; set; }
            [ParamDescription("是否定版 true：是 false：否")]
            public bool IsChooseFlag { get; set; }

            //[ParamDescription("评分类相关属性")]
            //public OrderGradeDetailDataList ScoreItem { get; set; }

            [ParamDescription("评分项、常用词、分数值相关属性")]
            public CommodityGradeWordList GradeWordItem { get; set; }

            [Description("商品评分数对象")]
            public CommodityScoreNum CommodityScore { get; set; }

            [ParamDescription("订货会内的相关统计数据")]
            public CountData CountNum { get; set; }
        }

        [Description("评分项和常用词名称列表")]
        public class CommodityGradeWordList
        {
            [ParamDescription("商品评分数据项")]
            public IList<GradeWordName> GradeName { get; set; }

            [ParamDescription("常用词数据项")]
            public IList<GradeWordName> WordName { get; set; }

            [ParamDescription("分数值数据项")]
            public IList<GradeWordName> ScoreName { get; set; }
        }

        [Description("评分项和常用词名称")]
        public class GradeWordName
        {
            [ParamDescription("评分项名称")]
            public string Name { get; set; }
        }

        [Description("商品评分数")]
        public class CommodityScoreNum
        {
            [ParamDescription("评分结果内码ID")]
            public int ResultID { get; set; }

            [ParamDescription("A店铺评分评分结果")]
            public decimal? AStoreRating { get; set; }

            [ParamDescription("B店铺评分评分结果")]
            public decimal? BStoreRating { get; set; }

            [ParamDescription("款式评分评分结果")]
            public decimal? StyleRating { get; set; }
        }

        [Description("订货会评分项数据列表实体类")]
        public class OrderGradeDetailDataList
        {
            [ParamDescription("评分结果内码ID")]
            public int ResultID { get; set; }
            [ParamDescription("个人得分=sum(评分项*占比)")]
            public decimal PersonalScore { get; set; }
            [ParamDescription("评分数据项")]
            public IList<OrderGradeDetailData> ScoreGrade { get; set; }
        }

        [Description("订货会评分项数据实体类")]
        public class OrderGradeDetailData
        {
            [ParamDescription("评分项内码ID")]
            public int GradeID { get; set; }
            [ParamDescription("评分项名称")]
            public string GradeName { get; set; }
            [ParamDescription("评分占比(%)")]
            public Nullable<decimal> GradeRate { get; set; }
            [ParamDescription("评分项得分")]
            public decimal Score { get; set; }

        }
        

        //[Description("获取评分结果实体类")]
        //public class GetOrderGradeResultList : OrderGradeResultMaterData
        //{
        //    [ParamDescription("每项评分结果集")]
        //    public IList<OrderGradeResultDetailData> ScoreData { get; set; }
        //}

        [Description("保存评分结果实体类")]
        public class SaveOrderGradeResult : OrderGradeResultMaterData
        {
            [ParamDescription("订货会内码ID")]
            public int MasterID { get; set; }
            [ParamDescription("流水号")]
            public string SerialNo { get; set; }
            [ParamDescription("每项评分结果集")]
            public IList<OrderGradeResultDetailData> ScoreData { get; set; }
        }

        [Description("保存评分结果实体类")]
        public class SaveOrderGradeResultV2 : OrderGradeResultMaterData
        {
            [ParamDescription("订货会内码ID")]
            public int MasterID { get; set; }
            [ParamDescription("流水号")]
            public string SerialNo { get; set; }
            [ParamDescription("每项评分结果集")]
            public OrderGradeResultDetailDataV2 ScoreData { get; set; }
        }

        [Description("评分结果数据实体类")]
        public class OrderGradeResultMaterData
        {
            [ParamDescription("评分结果内码ID")]
            public int ResultID { get; set; }
            [ParamDescription("个人得分=sum(评分项*占比)")]
            public decimal PersonalScore { get; set; }
            [ParamDescription("备注")]
            public string Remark { get; set; }
        }

        [Description("每项评分结果数据实体类")]
        public class OrderGradeResultDetailData
        {
            [ParamDescription("评分项内码ID")]
            public int GradeID { get; set; }
            [ParamDescription("评分项得分")]
            public decimal Score { get; set; }
        }

        [Description("每项评分结果数据实体类")]
        public class OrderGradeResultDetailDataV2
        {
            [ParamDescription("A店铺评分")]
            public decimal AStoreRating { get; set; }
            [ParamDescription("B店铺评分")]
            public decimal BStoreRating { get; set; }
            [ParamDescription("款式评分")]
            public decimal StyleRating { get; set; }
        }

        [Description("订货会内的所有设计号集合")]
        public class DesignNoData
        {
            [ParamDescription("设计号")]
            public IList<string> DesignNo { get; set; }
        }

        [Description("订货会内的相关统计数据")]
        public class CountData
        {
            [ParamDescription("根据订货会内码ID的SUM值")]
            public int MasterIDSum { get; set; }
            [ParamDescription("根据系列和项目的SUM值")]
            public int SerialItemSum { get; set; }
            [ParamDescription("获取系列和项目的SKC数")]
            public int SerialItemSKC { get; set; }
            [ParamDescription("我以评分的系列和项目的SUM值")]
            public int IScoreSum { get; set; }
            [ParamDescription("此流水号被评分的人数")]
            public int SerialNoSum { get; set; }
        }

        [Description("获取订版相关统计数据实体类")]
        public class CountVersionData
        {
            [ParamDescription("获取系列和项目的SKC数")]
            public int SerialItemSKC { get; set; }
            [ParamDescription("获取已选数")]
            public int SelectedNum { get; set; }
            [ParamDescription("系列")]
            public string SerialName { get; set; }
        }


        [Description("年份，季节，系列，商品层，项目")]
        public class SerialMaterialItemData
        {
            [ParamDescription("年份")]
            public IList<SerialMaterialItemModel> Year { get; set; }

            [ParamDescription("季节")]
            public IList<SerialMaterialItemModel> Season { get; set; }

            [ParamDescription("系列")]
            public IList<SerialMaterialItemModel> SerialName { get; set; }

            [ParamDescription("商品层")]
            public IList<SerialMaterialItemModel> MaterialProperty { get; set; }

            [ParamDescription("项目")]
            public IList<SerialMaterialItemModel> ItemName { get; set; }
        }

        [Description("系列商品层项目共用的实体类")]
        public class SerialMaterialItemModel
        {
            [ParamDescription("属性名称")]
            public string text { get; set; }
            [ParamDescription("属性ID")]
            public string value { get; set; }
        }

        [Description("历史结构查询实体类")]
        public class HistoricalStructureData
        {
            [ParamDescription("排序")]
            public int Num { get; set; }
            [ParamDescription("系列")]
            public string SerialName { get; set; }
            [ParamDescription("项目")]
            public string ItemName { get; set; }
            [ParamDescription("上期订货占比")]
            public decimal PurRate { get; set; }
            [ParamDescription("期间销售占比")]
            public decimal PeriodSale { get; set; }
            [ParamDescription("期间售罄率")]
            public decimal SoldOutRate { get; set; }
            [ParamDescription("期间销售折扣")]
            public decimal Discount { get; set; }
        }

        [Description("历史单款分析实体类")]
        public class HistoricalSingleAnalysisData
        {
            [ParamDescription("排名")]
            public int Num { get; set; }
            [ParamDescription("小图")]
            public string MinImage { get; set; }
            //[ParamDescription("大图")]
            //public string MaxImage { get; set; }
            [ParamDescription("系列")]
            public string SerialName { get; set; }
            [ParamDescription("项目")]
            public string ItemName { get; set; }
            [ParamDescription("货号")]
            public string MaterialID { get; set; }
            [ParamDescription("货称")]
            public string MaterialShortName { get; set; }
            [ParamDescription("颜色")]
            public string ColorName { get; set; }
            [ParamDescription("吊牌价")]
            public decimal RetailPrice { get; set; }
            [ParamDescription("销售数量")]
            public int SaleQty { get; set; }
            [ParamDescription("平均折扣")]
            public decimal Discount { get; set; }
            [ParamDescription("售罄率")]
            public decimal LifeSaleRate { get; set; }
            [ParamDescription("爆畅滞平超滞")]
            public string CZPFlag { get; set; }
        }

        [Description("本季订单查询实体类")]
        public class SeasonOrdersData
        {
            [ParamDescription("排名")]
            public int Num { get; set; }
            [ParamDescription("小图")]
            public string MinImage { get; set; }
            //[ParamDescription("大图")]
            //public string MaxImage { get; set; }
            [ParamDescription("系列")]
            public string SerialName { get; set; }
            [ParamDescription("项目")]
            public string ItemName { get; set; }
            [ParamDescription("货号")]
            public string MaterialID { get; set; }
            [ParamDescription("货称")]
            public string MaterialShortName { get; set; }
            [ParamDescription("颜色")]
            public string ColorName { get; set; }
            [ParamDescription("吊牌价")]
            public decimal RetailPrice { get; set; }
            [ParamDescription("订货数量")]
            public int PurQty { get; set; }
            [ParamDescription("上市日期DateTime")]
            public string SaleDate { get; set; }
            [ParamDescription("销售数量")]
            public int SaleQty { get; set; }
            [ParamDescription("平均折扣")]
            public decimal Discount { get; set; }
            [ParamDescription("当前售罄率")]
            public decimal LifeSaleRate { get; set; }
        }

    }
}
